<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/2/6
 * Time: 17:29
 */

namespace addons\admin\controller;


use think\addons\Controller;

class Contact extends Controller
{
    function index()
    {
        $contact = new \app\common\model\Contact();
        $cond = [];
        $search_ = input('search_');
        if ($search_) {
            $cond["message|title"] = ["LIKE", "%" . $search_ . "%"];
        }
        $contact->where($cond);
        $list_ = $contact->order("id desc")->paginate();
        $this->assign("list_", $list_);
        return $this->fetch();
    }
}